#ifndef UPDATER_ERRORS_H
#define UPDATER_ERRORS_H

#if 0
#include <errno.h>
#endif

extern INT errno;

#define OK 0
#define MAGIC_NUMBER    0xFF

#define	ERR			    (MAGIC_NUMBER)
#ifndef  ECANCELED
#   define ECANCELED    (MAGIC_NUMBER + 1)
#endif
#define ESTRING		    (MAGIC_NUMBER + 2) 
#define EARGUMENT		(MAGIC_NUMBER + 3) /* Error on an argument passing */
#define EMEMORY	    	(MAGIC_NUMBER + 4) /* Error on memory allocation / deallocation */
#define EFILEOPEN		(MAGIC_NUMBER + 5) /* Error on file opening */
#define EHOOK   		(MAGIC_NUMBER + 6) /* Error in hook processing */
#define EFIELD          (MAGIC_NUMBER + 7) /* Bad field - used on parsing  */
#define EMAP            (MAGIC_NUMBER + 8) /* Memoy mapping failed  */
#define ECLOSE          (MAGIC_NUMBER + 9) /* Error on file closing  */


#ifndef ENOSYS
#   define ENOSYS (38)
#endif

#ifndef EINVAL
#   define EINVAL (22)
#endif

#ifndef EIO
#   define EIO (5)
#endif

#ifndef EBADF
#   define EBADF (9)
#endif

#ifndef ENOENT 
#   define ENOENT 2
#endif

#ifndef ENOTDIR 
#   define ENOTDIR 20
#endif

#ifndef ELOOP 
#   define ELOOP 40
#endif

#ifndef EFAULT 
#   define EFAULT 14
#endif

#ifndef EACCES 
#   define EACCES 13
#endif

#ifndef ENOMEM 
#   define ENOMEM 12
#endif

#ifndef ENAMETOOLONG 
#   define ENAMETOOLONG 36
#endif

#ifndef ENOTSUP 
#   define ENOTSUP 95
#endif

#endif /* UPDATER_ERRORS_H */
